class StringBufferAndBuilderBenchMark{
public  void main(String[] fe){
int N = 77777777;
long t;
{

StringBuffer sb = new StringBuffer();
t = System.currentTimeMillis();
for(int i = N;i-->0;){
sb.append("");
}
System.out.println(System.currentTimeMillis() - t);
}

{
 synchronized(this){
 StringBuilder sb = new StringBuilder();
t = System.currentTimeMillis();
for(int i = N;i-->0;){
sb.append("");
}
System.out.println(System.currentTimeMillis() - t);
}
}
}
}